package biz.microplus.information.bean;

import biz.microplus.information.common.DateUtil;
import org.springframework.util.unit.DataUnit;

import javax.persistence.Entity;
import javax.persistence.Id;
import java.math.BigDecimal;

/**
 * 竞标记录数据模型
 */
@Entity
public class AuctionBidBean extends BaseBean {

    public AuctionBidBean() {
    }

    public AuctionBidBean(int auctionId, int parentId, BigDecimal amount) {
        this.auctionId = auctionId;
        this.parentId = parentId;
        this.amount = amount;
        this.createdAt = DateUtil.getNowTimestamp();
    }


    /**
     * 标识
     */
    @Id
    private int id;
    /**
     * 竞拍ID
     */
    private int auctionId;
    /**
     * 出价人ID
     */
    private int parentId;
    /**
     * 出价金额
     */
    private BigDecimal amount;
    /**
     * 删除时间戳
     */
    private int deletedAt;
    /**
     * 创建时间戳
     */
    private int createdAt;
    /**
     * 更新时间戳
     */
    private int updatedAt;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getAuctionId() {
        return auctionId;
    }

    public void setAuctionId(int auctionId) {
        this.auctionId = auctionId;
    }

    public int getParentId() {
        return parentId;
    }

    public void setParentId(int parentId) {
        this.parentId = parentId;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public int getDeletedAt() {
        return deletedAt;
    }

    public void setDeletedAt(int deletedAt) {
        this.deletedAt = deletedAt;
    }

    public int getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(int createdAt) {
        this.createdAt = createdAt;
    }

    public int getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(int updatedAt) {
        this.updatedAt = updatedAt;
    }
}